package com.test;

import java.util.Scanner;

public class Carimplement {
    public static void main(String[] args) {
        CarClass car[] = new CarClass[3];
        Scanner sc = new Scanner(System.in);

        for (int i = 0; i < 3; i++) {
            String brand;
            String color;
            int price;
            System.out.println("Please input the brand of car");
            brand = sc.next();
            System.out.println("Please input the color of car");
            color = sc.next();
            System.out.println("Please input the price of car");
            price = sc.nextInt();
            CarClass car_i = new CarClass(brand,price,color);
            car[i] = car_i;
        }
        for (int i = 0; i < 3; i++) {
            System.out.println(car[i].getBrand()+" is "+car[i].getColor()+" and the price is "+car[i].getPrice());
        }


    }
}
